if(NOT TARGET dep::parallel)
    add_library(dep_parallel INTERFACE IMPORTED)
    if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC" OR CMAKE_CXX_SIMULATE_ID MATCHES "MSVC") # MSVC ABI
        target_compile_definitions(dep_parallel INTERFACE AC_DEP_PARALLEL_PPL)
        message(STATUS "dep: parallel with MSVC PPL")
    else()
        find_package(OpenMP COMPONENTS CXX QUIET)
        if(OpenMP_CXX_FOUND)
            set(AC_DEP_PARALLEL_OPENMP TRUE)
            target_compile_definitions(dep_parallel INTERFACE AC_DEP_PARALLEL_OPENMP)
            target_link_libraries(dep_parallel INTERFACE OpenMP::OpenMP_CXX)
            message(STATUS "dep: parallel with OpenMP")
        else()
            set(AC_DEP_PARALLEL_THREADPOOL TRUE)
            target_compile_definitions(dep_parallel INTERFACE AC_DEP_PARALLEL_THREADPOOL)
            message(STATUS "dep: parallel with ThreadPool")
        endif()
    endif()
    add_library(dep::parallel ALIAS dep_parallel)
endif()
